//欧几里得算法，辗转相除求最大公约数
#include <stdio.h>
#include<stdlib.h>
//greatest common dividor
int gcd(int m,int n)
{
	if(m%n==0)	return n;
	return gcd(n,m%n);
}
void main(int argc,char *argv[])
{
	int m=atoi(argv[1]),n=atoi(argv[2]);
/* 	int m,n;
	printf("input m & n: ");
	scanf("%d %d",&m,&n); */
	printf("greatest common dividor is: %d\n",gcd(m,n));
}